package com.outstanding.his.entity.dao;

import java.io.Serializable;
import java.util.List;

import com.outstanding.his.util.pager.Pagination;


/**
 * 针对单个Entity对象的操作定义.不依赖于具体ORM实现方案.
 * @param <T>
 *
 */
public interface IEntityDao<T> {

	public Object getEntity(Serializable entityId);
	
	public Pagination pagedEntityQuery(String hql, int pageNo, int pageSize, Object[] parameters);
	
	public Pagination pagedEntityQuery(String hql, int pageNo, int pageSize, int pageSpan, Object[] parameters);

	public List<T> listEntity(String query,int firstIndex,int pageSize,Object[] parameters);
	
	public List<T> listAllEntity();
	
	public void saveEntity(Object object);

	public void removeEntity(Object object);

	public void removeEntityById(Serializable entityId);
	
	public Integer getEntityCount();

}
